<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.ys1{
				color:red;
			}
			
			.ys2{
				color:blue;
			}
		</style>
	</head>
	<body>
		<input id="t1" type="text" value="你好"/>
		
		<span id="s1" class="ys1">今天天气很晴朗</span>
		<br />
		性别：<input type="radio" name = "sex" value="man" checked="checked"/>男
		<input type="radio" name = "sex" value="woman" />女
		
		<br />
		爱好：<input id = "hobby"  name="hobby" type="checkbox" value="yy" />游泳
		<input name="hobby" type="checkbox" value="ds" />登山
		<input name="hobby" type="checkbox" value="pb" />跑步
		<script>
			// 修改值
			var t1 = document.getElementById("t1");
			alert(t1.value);
			t1.value = "你好么";
			
			// 修改样式
			var s1 = document.getElementById("s1");
			alert(s1.className);
			s1.className = "ys2";
			
			// checked
			var hobby = document.getElementById("hobby");
			alert(hobby.checked);
			hobby.checked = true;
			
			// innerHtml
			alert(s1.innerHTML); 
			s1.innerHTML = "今天好像要下雪";
			
			
		</script>
	</body>
</html>
